<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Testing direct image layer optimisation</title>
  <style type="text/css" media="screen">
    img {
      float: left;
      width: 150px;
      height: 150px;
    }
    img {
      -webkit-transform: rotate3d(0, 0, 1, 0);
    }
    .test {
      float: left;
      height: 200px;
      width: 260px;
    }
   </style>
</head>
<body>

  <h1>Image optimisation in layers</h1>

  <p>
    This test exercises direct compositing of images with hardware acceleration. The visual results
    using ACCELERATED_COMPOSITING and regular TOT should be identical. Running this test manually with
    the correct debug options will show which elements are directly composited. See
    <a href="https://bugs.webkit.org/show_bug.cgi?id=23361">https://bugs.webkit.org/show_bug.cgi?id=23361</a>
  </p>

  <div class="test">
    <img src="resources/simple_image.png">
    Basic image - no style - can be directly composited
  </div>

  <div class="test">
    <img src="resources/simple_image.png" style="border: 5px solid blue;">
    5px blue border - can NOT be directly composited
  </div>

  <div class="test">
    <img src="resources/simple_image.png" style="margin: 5px 5px;">
    margin - can NOT be directly composited
  </div>

  <div class="test">
    <img src="resources/simple_image.png" style="background-color: grey;">
    solid background - can be directly composited
  </div>

  <div class="test">
    <img src="resources/simple_image.png" style="background: orange url(resources/simple_image.png) -50px -50px;">
    background image - can NOT be directly composited
  </div>

  <div class="test">
    <img src="resources/simple_image.png" style="-webkit-transform: rotate3d(0, 0, 1, 10deg);">
    rotated but otherwise no style - can be directly composited
  </div>

</body>
</html>
